﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.MountAndBlade.MissionSpawnHandlers.CustomSallyOutMissionController
// Assembly: TaleWorlds.MountAndBlade, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: D5209D1B-76B5-47CA-B957-255CD4B2CE6B
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.dll

using TaleWorlds.Core;

#nullable disable
namespace TaleWorlds.MountAndBlade.MissionSpawnHandlers
{
  public class CustomSallyOutMissionController : SallyOutMissionController
  {
    private readonly CustomBattleCombatant[] _battleCombatants;

    public CustomSallyOutMissionController(
      IBattleCombatant defenderBattleCombatant,
      IBattleCombatant attackerBattleCombatant)
    {
      this._battleCombatants = new CustomBattleCombatant[2]
      {
        (CustomBattleCombatant) defenderBattleCombatant,
        (CustomBattleCombatant) attackerBattleCombatant
      };
    }

    protected override void GetInitialTroopCounts(
      out int besiegedTotalTroopCount,
      out int besiegerTotalTroopCount)
    {
      besiegedTotalTroopCount = this._battleCombatants[0].NumberOfHealthyMembers;
      besiegerTotalTroopCount = this._battleCombatants[1].NumberOfHealthyMembers;
    }
  }
}
